<?php

require_once "spElement.php";

class spSelect extends spElement
{
	public function __construct( $data=null )
	{
		parent::__construct( "select", $data );
		parent::setMustHaveEndingTag( true );

		if ( isset($data["name"]) )
			$this->addAttr( "name", $data["name"] );
	}
	
	public function render()
	{
		if ( parent::readOnly() )
		{
			parent::addAttr( "readonly", "readonly" );
			parent::addAttr( "disabled", "disabled" );
		}
		
		parent::render();
	}	
}

?>